#ifndef SBTPLATFORM_H_INCLUDED
#define SBTPLATFORM_H_INCLUDED

// platform information
#define SBT_PLATFORM_WIN32 1
#define SBT_PLATFORM_LINUX 2

// compiler information
#define SBT_COMPILER_MSVC 1
#define SBT_COMPILER_GUNC 2

// define compiler
#if defined( _MSC_VER )
    #define SBT_COMPILER	SBT_COMPILER_MSVC
#elif defined( __GNUC__ )
    #define SBT_COMPILER	SBT_COMPILER_GUNC
#else
    #pragma error "unknown compiler"
#endif

// define system
#if defined( __WIN32__ ) || defined( _WIN32 )
    #define SBT_PLATFORM	SBT_PLATFORM_WIN32
#else
    #define SBT_PLATFORM	SBT_PLATFORM_LINUX
#endif

// define compiler options
#if SBT_PLATFORM == SBT_PLATFORM_WIN32
    #if defined( SBT_STATIC_LIB )
        #define SBT_EXPORT
        #define SBT_PRIVATE
    #else
        #if defined( SBT_NONCLIENT_BUILD )
            #define SBT_EXPORT __declspec( dllexport )
        #else
            #if defined( __MINGW32__ )
                #define SBT_EXPORT
            #else
                #define SBT_EXPORT __declspec( dllimport )
            #endif
        #endif
        #define SBT_PRIVATE
    #endif
#endif

#if SBT_PLATFORM == SBT_PLATFORM_LINUX
    #if defined( SBT_GCC_VISIBILITY )
        #define SBT_EXPORT	__attribute__((visibility("default")))
        #define SBT_PRIVATE	__attribute__((visibility("hidden")))
    #else
        #define SBT_EXPORT
        #define SBT_PRIVATE
    #endif
#endif

// calling convention
#if SBT_COMPILER == SBT_COMPILER_MSVC
    #define SBT_CC_CDECL	__cdecl
    #define SBT_CC_STDCALL	__stdcall
#elif SBT_COMPILER == SBT_COMPILER_GUNC
    #define SBT_CC_CDECL	__attribute__((__cdecl__))
    #define SBT_CC_STDCALL	__attribute__((__stdcall__))
#endif

#endif // SBTPLATFORM_H_INCLUDED